//
//  BSWebVCView.m
//  BS
//
//  Created by lanou on 15/8/24.
//  Copyright (c) 2015年 lanou. All rights reserved.
//

#import "BSWebVCView.h"

#import "NSString+Html.h"

@interface BSWebVCView ()

@property (weak, nonatomic) IBOutlet UIWebView *webView;
@end

@implementation BSWebVCView


- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil{

    if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
        self.hidesBottomBarWhenPushed = YES;
    }
    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationController.interactivePopGestureRecognizer.delegate = (id)self;
    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:self.htmlStr]];
    [_webView loadRequest:request];
//    self.htmlStr = [NSString stringWithFormat:@"<head> </head> <article class=\"typo container\">%@",self.htmlStr];
//    NSString *str = [NSString importStyleWithHtmlString:self.htmlStr];
//   [self.webView loadHTMLString: str baseURL:[NSURL fileURLWithPath:[NSBundle mainBundle].bundlePath]];
    // Do any additional setup after loading the view from its nib.
}

- (IBAction)back:(UIBarButtonItem *)sender {
    
    [self.navigationController popViewControllerAnimated:YES];
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
